package com.aliware.tianchi.test;

import java.util.concurrent.Semaphore;

/**
 * @author lorne
 * @date 2019/6/28
 * @description
 */
public class MediumProvider implements TestProvider {

    int avg = 45;

    private Semaphore semaphore = new Semaphore(200);


    @Override
    public void run(){
        try {
            semaphore.acquire();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
        try {
            Thread.sleep(avg);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        semaphore.release();
    }




}
